<div class="properties-rows agents-rows refine-search-form" style="padding: 5px 10px 20px;">
	<div class="row-fluid">
		<div class="w-box-search-form w-box-search-form-header">
			<h5>LOCAL REFINE SEARCH</h5>
		</div>
	</div>
	<div class="formSep">
		<div class="row-fluid">
			<div class="span12">
				<div class="content">
					<form action="?" method="get" class="agent-form">
						<div class="row-fluid">
							<div class="span2">
								<label class="radio"> 
									<input type="radio" name="propertyfor" id="forsaleorforrent1" value="sale" <?php if($propertyfor == "sale") {echo 'checked="checked"';} ?>>&nbsp;<?php echo $text_property_forsale; ?> 
								</label>
								<label class="radio"> 
									<input type="radio" name="propertyfor" id="forsaleorforrent2" value="rent" <?php if($propertyfor == "rent") {echo 'checked="checked"';} ?>>&nbsp;<?php echo $text_property_forlease; ?>
								</label>
							</div>
							<div class="span10">
								<div class="row-fluid">
									<div class="span4">
										<div class="control-group">
											<div class="controls">
												<input type="text" class="search-query form-text" placeholder="<?php echo $text_keyword_of_properties; ?>" id="keyword" name="keyword" value="<?php echo $keyword; ?>">
											</div>
											<!-- /.controls -->
										</div>
										<!-- /.control group -->
									</div>
									<div class="span4">
										<div class="location control-group">
											<div class="controls">
												<select id="inputLocation" name="cities" class="span12">
												<option value="" id="all-location"><?php echo $text_all_cities; ?></option>
												<?php if(count($lkup_cities) > 0) { ?>
												<?php foreach ($lkup_cities as $city) { ?>
												<option value="<?php echo $city->City_ID; ?>" <?php if(is_array($cities) && count($cities) > 0 && in_array($city->City_ID, $cities)) {echo 'selected="selected"';} ?>><?php echo $city->Name; ?></option>
												<?php } ?>
												<?php } ?>
												</select>
											</div>
											<!-- /.controls -->
										</div>
										<!-- /.control group -->
									</div>
									<div class="span4">
										<div class="location control-group">
											<div class="controls">
												<select id="propertytype" name="propertytype" class="span12">
													<option value="" selected="selected"><?php echo $text_all_propertytype; ?></option>
													<?php if(count($dd_propertytype) > 0) { ?>
													<?php foreach ($dd_propertytype as $type) { ?>
													<option value="<?php echo $type->PropertyType_ID; ?>" <?php if(isset($propertytype) && $propertytype == $type->PropertyType_ID) {echo 'selected="selected"';} ?>><?php echo $type->Name; ?></option>
													<?php } ?>
													<?php } ?>
												</select>
											</div>
											<!-- /.controls -->
										</div>
										<!-- /.control group -->
									</div>
								</div>
								<div class="formSep">
									<div class="row-fluid">
										<div class="span4">
											<div class="type control-group">
												<div class="controls">
													<select name="tenure" id="tenure" class="span12">
														<option value="" selected="selected"><?php echo $text_all_tenure; ?></option>
														<?php if(count($tenure) > 0) { ?>
														<?php foreach ($tenure as $item) { ?>
														<option value="<?php echo $item->Tenure_ID; ?>"><?php echo $item->Name; ?></option>
														<?php } ?>
														<?php } ?>
													</select>
												</div>
												<!-- /.controls -->
											</div>
										</div>
										<div class="span4">
											<div class="type control-group">
												<div class="controls">
													<select name="sort" id="sort" class="span12">
														<?php foreach ($sorts as $sorts) { ?>
														<?php if ($sorts['value'] == $sort) { ?>
														<option value="<?php echo $sorts['value']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
														<?php } else { ?>
														<option value="<?php echo $sorts['value']; ?>"><?php echo $sorts['text']; ?></option>
														<?php } ?>
														<?php } ?>
													</select>
												</div>
												<!-- /.controls -->
											</div>
										</div>
										<div class="span4">
											<div class="type control-group">
												<div class="controls">
													<select name="size_min" id="size_min" class="span12">
														<option value="" selected="selected"><?php echo $text_size; ?></option>
														<?php if(count($size) > 0) { ?>
														<?php foreach ($size as $item) { ?>
														<option value="<?php echo $item->Value; ?>" <?php if(isset($size_min) && $size_min == $item->Value){echo 'selected="selected"';} ?>><?php echo $item->Sizeoption; ?></option>
														<?php } ?>
														<?php } ?>
													</select>
												</div>
												<!-- /.controls -->
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="formSep">
							<div class="row-fluid">
								<div class="span2">
									<label class="control-label"><?php echo $text_search_by_map; ?></label>
									<img id="search-by-map" alt="<?php echo $text_search_by_map; ?>" src="<?php echo $this->config->item('HTTP_IMAGE'); ?>search-by-map.png">
								</div>
								<div class="span10">
									<div class="row-fluid">
										<div class="span4">
											<div class="row-fluid">
												<div class="span2"><label class="control-label price-lbl"
													for="inputPrice"><?php echo $text_price; ?></label>
												</div>
												<div class="span4">
													<input name="price_min" value="<?php if(isset($price_min)) {echo $price_min;} ?>" type="text" id="price_min" class="span12 price_min small" placeholder="<?php echo $text_min; ?>">
												</div>
												<div class="span2">
													<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
												</div>
												<div class="span4">
													<input name="price_max" value="<?php if(isset($price_max)) {echo $price_max;} ?>" type="text" id="price_max" class="span12 price_max small" placeholder="<?php echo $text_max; ?>">
												</div>
											</div>
										</div>
										<div class="span4">
											<div class="row-fluid">
												<div class="span4"><label class="control-label bedroom-lbl"
													for="inputBedrooms"><?php echo $text_bedrooms; ?></label>
												</div>
												<div class="span3">
													<input name="bedroom_min" value="<?php if(isset($bedroom_min)) {echo $bedroom_min;} ?>" type="text" id="bedroom_min" class="span12 bedroom_min small" placeholder="<?php echo $text_min; ?>">
												</div>
												<div class="span2">
													<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
												</div>
												<div class="span3">
													<input name="bedroom_max" value="<?php if(isset($bedroom_max)) {echo $bedroom_max;} ?>" type="text" id="bedroom_max" class="span12 bedroom_max small" placeholder="<?php echo $text_max; ?>">
												</div>
											</div>
										</div>
										<div class="span4">
											<div class="row-fluid">
												<div class="span4"><label class="control-label bathroom-lbl"
													for="inputBedrooms"><?php echo $text_bathrooms; ?></label>
												</div>
												<div class="span3">
													<input name="bathroom_min" value="<?php if(isset($bathroom_min)) {echo $bathroom_min;} ?>" type="text" id="bathroom_min" class="span12 bathroom_min small" placeholder="<?php echo $text_min; ?>">
												</div>
												<div class="span2">
													<label class="control-label price-lbl to-lbl" for="inputTo"><?php echo $text_to; ?></label>
												</div>
												<div class="span3">
													<input name="bathroom_max" value="<?php if(isset($bathroom_max)) {echo $bathroom_max;} ?>" type="text" id="bathroom_max" class="span12 bathroom_max small" placeholder="<?php echo $text_max; ?>">
												</div>
											</div>
										</div>
									</div>
									<div class="row-fluid">
										<div class="span8">
											<div class="pull-right">
												<label for="type_all" class="radio inline"><input type="radio" name="listing_type" checked="checked" id="type_all"> All Listings</label>
												<label for="type_launches" class="radio inline"><input type="radio" name="listing_type" id="type_launches"> New Launches</label>
												<label for="type_resales" class="radio inline"><input type="radio" name="listing_type" id="type_resales"> Resales</label>
											</div>
										</div>
										<div class="span4">
											<div class="type control-group">
												<div class="controls form-actions">
													<input type="submit" value="Search" class="btn btn-primary btn-large arrow-right">
												</div>
												<!-- /.controls -->
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<div class="formSep">
		<div class="content text-center">
			<h4 style="color: #FFF;"><span style="font-weight: 700; font-size: 48px;"><?php echo $total_count; ?></span> <span>Properties(s) Found</span></h4>
		</div>
	</div>
	<!-- /.search form -->
</div>
<!-- /.properties-rows -->
<div class="properties-rows">
	<div class="row-fluid">
		<div class="span3 pull-right">
			<div class="row-fluid">
				<div class="span8"><label class="control-label control-label-Show"
					for="inputShow"> No. Listing per page:  </label></div>
				<div class="span4"><select onchange="location = this.value;"
					class="selectShow span12">
					<?php foreach ($limits as $item) { ?>
					<?php if ($item['value'] == $limit) { ?>
					<option value="<?php echo $item['href']; ?>" selected="selected"><?php echo $item['text']; ?></option>
					<?php } else { ?>
					<option value="<?php echo $item['href']; ?>"><?php echo $item['text']; ?></option>
					<?php } ?>
					<?php } ?>
				</select></div>
			</div>
		</div>
		<div class="span4 pull-right">
			<div class="row-fluid">
				<div class="span3"><label class="control-label control-label-Show" for="inputSortBy"> Sort
				by </label></div>
				<div class="span9"><select name="sortby"
					onchange="location = this.value;" class="dd dropbox dropdownlist span10"
					id="sortby_">
					<?php foreach ($sortby as $sorts) { ?>
					<option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
					<?php } ?>
				</select></div>
			</div>
		</div>
	</div>
</div>

